package com.wanxing.sellerapp.seller.options;

public class WeightSellerOptions {

    /**
     * 默认校准砝码重量:  1000g
     */
    public static final int DEFAULT_CALIBRATE_WEIGHT = 1000;

    /**
     * 默认接受重量误差:  5g
     */
    public static final int DEFAULT_WEIGHT_DETECTION_ERROR = 5;

    public static final String DEFAULT_PORT_ADDRESS = "/dev/ttyS3";


    /**
     * 端口地址
     */
    private String portAddress = DEFAULT_PORT_ADDRESS;

    /**
     * 可接受重量误差： 当秤变化值小于误差值，不判定秤重量产生了变化。
     */
    private int acceptWeightError = DEFAULT_WEIGHT_DETECTION_ERROR;

    /**
     * 校准重量(g)
     */
    private int calibrateWeight = DEFAULT_CALIBRATE_WEIGHT;


    public String getPortAddress() {
        return portAddress;
    }

    public WeightSellerOptions setPortAddress(String portAddress) {
        this.portAddress = portAddress;
        return this;
    }

    public int getCalibrateWeight() {
        return calibrateWeight;
    }

    public void setCalibrateWeight(int calibrateWeight) {
        this.calibrateWeight = calibrateWeight;
    }

    public int getAcceptWeightError() {
        return acceptWeightError;
    }

    public void setAcceptWeightError(int acceptWeightError) {
        this.acceptWeightError = acceptWeightError;
    }
}
